/*!
    \file    xpt2046.h
    \brief   drive of xpt2046

    \version 2024-02-28, V1.0.0
*/
#include "stdint.h"
#include "stdbool.h"


typedef struct __xpt2046_handle
{
		void (*SpiSendData)(unsigned char sendData);
}xpt2046_handle_t ;

typedef struct __touchPoint
{
		uint32_t x;
		uint32_t y;
}touchPoint_t;

typedef struct __touchParam
{
		uint32_t HaveAdjust;
		float kx;
		float dx;
		float ky;
		float dy;
}touchParam_t;

typedef struct __lcdSize
{
		uint16_t width;
		uint16_t height;
}lcdSize_t;

extern volatile touchParam_t touchParam;
extern lcdSize_t lcdSize;
extern touchPoint_t GetCurrentTouchPoint(void);
uint8_t checkXpt2046AdjustStatus(void);
extern void Xpt2046TouchAdjust(void);
extern void Xpt2046Init(void);
extern touchPoint_t get_data(void);